#include "KeyInput.h"


KeyInput::KeyInput()
{
	m_eState = NONE;
}


KeyInput::~KeyInput()
{
}

const KEY_STATE& KeyInput::getKeyState()
{
	char ch = getch();
	switch (ch)
	{
	case 'w':
	case'W':
		m_eState = MOVE_UP;
		break;
	case 'd':
	case'D':
		m_eState = MOVE_RIGHT;
		break;
	case 's':
	case'S':
		m_eState = MOVE_DOWN;
		break;
	case 'A':
	case'a':
		m_eState = MOVE_LEFT;
		break;
	default:
		m_eState = NONE;
		break;
	}
	return m_eState;
}
